package com.example.schedulecard.DataTransfer;

import android.content.Context;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

import com.example.schedulecard.Entity.Schedule;
import com.example.schedulecard.R;

public class ScheduleNameTransfer {
    public static Schedule scheduleinfo = null;

    public static void setweekdayspinner(Context context, Schedule schedule, Spinner spinner) {
        String[] weekl = new String[]{"1", "2", "3", "4", "5", "6"};
        String[] weekq = new String[]{"1", "2", "3", "4", "5", "6", "7"};
        switch (schedule.getWorksum()) {
            case 6:
                ArrayAdapter<String> adapterl = new ArrayAdapter<String>(context, R.layout.my_spinner_item, weekl);
                spinner.setAdapter(adapterl);
                break;
            case 7:
                ArrayAdapter<String> adapterq = new ArrayAdapter<String>(context, R.layout.my_spinner_item, weekq);
                spinner.setAdapter(adapterq);
                break;
            default:
        }
    }
}
